Optimal. Leaf size=46 \[ -\frac{\cot ^4(x)}{4 a}+\frac{3 \tanh ^{-1}(\cos (x))}{8 a}+\frac{\cot ^3(x) \csc (x)}{4 a}-\frac{3 \cot (x) \csc (x)}{8 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0962216, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {2706, 2607, 30, 2611, 3770} \[ -\frac{\cot ^4(x)}{4 a}+\frac{3 \tanh ^{-1}(\cos (x))}{8 a}+\frac{\cot ^3(x) \csc (x)}{4 a}-\frac{3 \cot (x) \csc (x)}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2706
Rule 2607
Rule 30
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\cot ^3(x)}{a+a \cos (x)} \, dx &=-\frac{\int \cot ^4(x) \csc (x) \, dx}{a}+\frac{\int \cot ^3(x) \csc ^2(x) \, dx}{a}\\ &=\frac{\cot ^3(x) \csc (x)}{4 a}+\frac{3 \int \cot ^2(x) \csc (x) \, dx}{4 a}-\frac{\operatorname{Subst}\left (\int x^3 \, dx,x,-\cot (x)\right )}{a}\\ &=-\frac{\cot ^4(x)}{4 a}-\frac{3 \cot (x) \csc (x)}{8 a}+\frac{\cot ^3(x) \csc (x)}{4 a}-\frac{3 \int \csc (x) \, dx}{8 a}\\ &=\frac{3 \tanh ^{-1}(\cos (x))}{8 a}-\frac{\cot ^4(x)}{4 a}-\frac{3 \cot (x) \csc (x)}{8 a}+\frac{\cot ^3(x) \csc (x)}{4 a}\\ \end{align*}
Mathematica [A] time = 0.144443, size = 60, normalized size = 1.3 \[ -\frac{2 \cot ^2\left (\frac{x}{2}\right )+\sec ^2\left (\frac{x}{2}\right )-12 \cos ^2\left (\frac{x}{2}\right ) \left (\log \left (\cos \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )\right )\right )-8}{16 a (\cos (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.052, size = 55, normalized size = 1.2 \begin{align*}{\frac{1}{8\,a \left ( -1+\cos \left ( x \right ) \right ) }}-{\frac{3\,\ln \left ( -1+\cos \left ( x \right ) \right ) }{16\,a}}-{\frac{1}{8\,a \left ( \cos \left ( x \right ) +1 \right ) ^{2}}}+{\frac{1}{2\,a \left ( \cos \left ( x \right ) +1 \right ) }}+{\frac{3\,\ln \left ( \cos \left ( x \right ) +1 \right ) }{16\,a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.15431, size = 76, normalized size = 1.65 \begin{align*} \frac{5 \, \cos \left (x\right )^{2} + \cos \left (x\right ) - 2}{8 \,{\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) - a\right )}} + \frac{3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} - \frac{3 \, \log \left (\cos \left (x\right ) - 1\right )}{16 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.44269, size = 269, normalized size = 5.85 \begin{align*} \frac{10 \, \cos \left (x\right )^{2} + 3 \,{\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - 3 \,{\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) + 2 \, \cos \left (x\right ) - 4}{16 \,{\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) - a\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cot ^{3}{\left (x \right )}}{\cos{\left (x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.29375, size = 68, normalized size = 1.48 \begin{align*} \frac{3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} - \frac{3 \, \log \left (-\cos \left (x\right ) + 1\right )}{16 \, a} + \frac{5 \, \cos \left (x\right )^{2} + \cos \left (x\right ) - 2}{8 \, a{\left (\cos \left (x\right ) + 1\right )}^{2}{\left (\cos \left (x\right ) - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]